// *************************************************************************************************
//
// MK3D Engine
// --------------------------------------
// Copyright (C) 2007-2011 Zeb (mailto: zebbey@gmail.com)
//
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//
// *************************************************************************************************

#ifndef __H_MK_RENDER_DEFINE__
#define __H_MK_RENDER_DEFINE__

namespace MK3DE
{
	enum PRIMITIVE_TYPE
	{
		PT_LINELIST,
		PT_LINESTRIP,
		PT_TRIANGLELIST,
		PT_TRIANGLESTRIP,
	};

	enum STREAM_USAGE
	{
		SU_POSITION,
		SU_COLOR,
		SU_NORMAL,
		SU_TEXCOORD,
		SU_POSITION_T,
		SU_BLEND_INDICES,
		SU_BLEND_WEIGHT,
	};

	enum INDEX_TYPE
	{
		IT_16BIT,
		IT_32BIT,
	};

	enum HARDWARE_BUFFER_USAGE
	{
		HBU_STATIC = 1,
		HBU_DYNAMIC = 2,
		HBU_WRITE_ONLY = 4,
	};

	enum LOCK_OPTION
	{
		LO_READ_WRITE,
		LO_READ_ONLY,
		LO_NO_OVER_WRITE,
		LO_DISCARD,
	};

	enum PIXEL_FORMAT
	{
		PF_R5G6B5,
		PF_R8G8B8,
		PF_A4R4G4B4,
		PF_X8R8G8B8,
		PF_A8R8G8B8,
		PF_R8G8B8A8,
		PF_R32F,
		PF_A8,
		PF_L8,
		PF_UNKNOWN,
	};

	enum DATA_TYPE
	{
		DT_FLOAT,
		DT_FLOAT2,
		DT_FLOAT3,
		DT_FLOAT4,
		DT_MATRIX,
		DT_INT,
	};

	enum TEXTURE_USAGE
	{
		TU_NORMAL,
		TU_RENDER_TARGET,
		TU_DYNAMIC,
	};

	enum RENDER_STATE
	{
		RS_ALPHA_BLEND_ENABLE = 0,
		RS_ALPHA_TEST_ENALBE,
		RS_DEPTH_ENABLE,
		RS_DEPTH_WRITE_ENABLE,
		RS_CULL_MODE,
		RS_SRC_BLEND,
		RS_DEST_BLEND,
		RS_ALPHA_TEST_FUNC,
		RS_ALPHA_TEST_REF,
	};

	enum CULLING_MODE
	{
		CM_NO = 0,
		CM_CW,
		CM_CCW,
	};

	enum BLEND_PARAM
	{
		BP_SRC_ALPHA = 0,
		BP_INV_SRC_ALPHA,
		BP_ONE,
	};

	enum ALPHA_TEST_TYPE
	{
		ATT_NEVER = 0,
		ATT_LESS,
		ATT_EQUAL,
		ATT_NOT_EQUAL,
		ATT_LESS_EQUAL,
		ATT_GREATER,
		ATT_GREATER_EQUAL,
		ATT_ALWAYS,
	};

	struct VERT_2D_COL_TEX1
	{
		D3DXVECTOR4 pos;
		DWORD color;
		D3DXVECTOR2 uv;
	};

	struct VERT_2D_TEX1
	{
		D3DXVECTOR4 pos;
		D3DXVECTOR2 uv;
	};

	struct VERT_3D_COL_TEX1
	{
		D3DXVECTOR3 pos;
		DWORD color;
		D3DXVECTOR2 uv;
	};

	struct VERT_3D_TEX1
	{
		D3DXVECTOR3 pos;
		D3DXVECTOR2 uv;
	};
};

#endif // __H_MK_RENDER_DEFINE__